package com.jamin.msg.ui;

import com.jamin.msg.R;

import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceManager;
import android.preference.Preference.OnPreferenceChangeListener;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceActivity;
import android.util.Log;

public class MessagePreferenceActivity extends PreferenceActivity{

	private static final String TAG = "MessagePreferenceActivity====wangjieming";
	private static final boolean DEBUG = true;

	//NOTICE SET
	public static final String PREF_KEY_MSG_NOTICE_SETTING = "pref_key_msg_notice_setting";
	public static final String PREF_KEY_MSG_NOTICE_CUSTOM_ICON = "pref_key_msg_notice_custom_icon";
	public static final String PREF_KEY_MSG_NOTICE_CUSTOM_RINGTONES = "pref_key_msg_notice_custom_ringtones";
	public static final String PREF_KEY_MSG_NOTICE_VIBRATOR = "pref_key_msg_notice_vibrator";


	CheckBoxPreference msgNoticeCheckPrenference;
	Preference msgCustomRingtonesPreference;
	Preference msgCustomIconPreference;
	ListPreference msgVibratorPreference;


	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		addPreferencesFromResource(R.xml.msgpreference);
		
		
		init();

	}
	private void init(){
		/**
		 * Init 控件
		 */
		msgNoticeCheckPrenference = (CheckBoxPreference) findPreference(PREF_KEY_MSG_NOTICE_SETTING);
		msgCustomRingtonesPreference =  findPreference(PREF_KEY_MSG_NOTICE_CUSTOM_RINGTONES);
		msgCustomIconPreference = findPreference(PREF_KEY_MSG_NOTICE_CUSTOM_ICON);
		msgVibratorPreference = (ListPreference) findPreference(PREF_KEY_MSG_NOTICE_VIBRATOR);
		
		/**
		 * 初始化控件状态
		 */
		
	}

}
